if (offset_tag) {
char* time_tag = exif_read_str(offset_tag);
// string should be +HH:MM or -HH:MM
- const QRegularExpression re(R"(^([+-])(\d{2}):(\d{2})$)");
+ static const QRegularExpression re(R"(^([+-])(\d{2}):(\d{2})$)");
assert(re.isValid());
QRegularExpressionMatch match = re.match(time_tag);
if (match.hasMatch()) {
{
qint64 result = 0;
- QRegularExpression re("^([+-]?\\d+)([wdhms])(?:([+-]?\\d+)([wdhms]))?(?:([+-]?\\d+)([wdhms]))?(?:([+-]?\\d+)([wdhms]))?(?:([+-]?\\d+)([wdhms]))?$", QRegularExpression::CaseInsensitiveOption);
+ static const QRegularExpression re("^([+-]?\\d+)([wdhms])(?:([+-]?\\d+)([wdhms]))?(?:([+-]?\\d+)([wdhms]))?(?:([+-]?\\d+)([wdhms]))?(?:([+-]?\\d+)([wdhms]))?$", QRegularExpression::CaseInsensitiveOption);
assert(re.isValid());
QRegularExpressionMatch match = re.match(arg);
if (match.hasMatch()) {
opt_interval = (opt_split && (strlen(opt_split) > 0) && (0 != strcmp(opt_split, TRACKFILTER_SPLIT_OPTION)));
if (opt_interval != 0) {
- QRegularExpression re(R"(^([+-]?(?:\d+(?:\.\d*)?|\.\d+))([dhms])$)", QRegularExpression::CaseInsensitiveOption);
+ static const QRegularExpression re(R"(^([+-]?(?:\d+(?:\.\d*)?|\.\d+))([dhms])$)", QRegularExpression::CaseInsensitiveOption);
assert(re.isValid());
QRegularExpressionMatch match = re.match(opt_split);
if (match.hasMatch()) {
opt_distance = (opt_sdistance && (strlen(opt_sdistance) > 0) && (0 != strcmp(opt_sdistance, TRACKFILTER_SDIST_OPTION)));
if (opt_distance != 0) {
- QRegularExpression re(R"(^([+-]?(?:\d+(?:\.\d*)?|\.\d+))([km])$)", QRegularExpression::CaseInsensitiveOption);
+ static const QRegularExpression re(R"(^([+-]?(?:\d+(?:\.\d*)?|\.\d+))([km])$)", QRegularExpression::CaseInsensitiveOption);
assert(re.isValid());
QRegularExpressionMatch match = re.match(opt_sdistance);
if (match.hasMatch()) {
{
QDateTime result;
- QRegularExpression re("^(\\d{0,14})$");
+ static const QRegularExpression re("^(\\d{0,14})$");
assert(re.isValid());
QRegularExpressionMatch match = re.match(timestr);
if (match.hasMatch()) {
{
faketime_t result;
- QRegularExpression re(R"(^(f?)(\d{0,14})(?:\+(\d{1,10}))?$)");
+ static const QRegularExpression re(R"(^(f?)(\d{0,14})(?:\+(\d{1,10}))?$)");
assert(re.isValid());
QRegularExpressionMatch match = re.match(timestr);
if (match.hasMatch()) {
}
// Separate op and tokens.
- int sep = line.indexOf(QRegularExpression(R"(\s+)"));
+ static const QRegularExpression re(R"(\s+)");
+ int sep = line.indexOf(re);
// the first token is the operation, e.g. "IFIELD"
QString op = line.mid(0, sep).trimmed().toUpper();